package org.apache.harmony.javax.security.auth.callback;

import java.io.Serializable;

public class TextOutputCallback
  implements Callback, Serializable
{
  public static final int ERROR = 2;
  public static final int INFORMATION = 0;
  public static final int WARNING = 1;
  private static final long serialVersionUID = 2082198014L;
  private String message;
  private int messageType;

  public TextOutputCallback(int paramInt, String paramString)
  {
    if ((paramInt > 2) || (paramInt < 0))
      throw new IllegalArgumentException("auth.16");
    if ((paramString == null) || (paramString.length() == 0))
      throw new IllegalArgumentException("auth.1F");
    this.messageType = paramInt;
    this.message = paramString;
  }

  public String getMessage()
  {
    return this.message;
  }

  public int getMessageType()
  {
    return this.messageType;
  }
}